package com.lcg.learn.factory.simpleFactory;

import com.lcg.learn.factory.simpleFactory.model.Audi;
import com.lcg.learn.factory.simpleFactory.model.Bmw;
import com.lcg.learn.factory.simpleFactory.model.Car;

public class CarFactory {
    public Car makeCar(String carName){
        if("宝马".equals(carName)){
            return new Bmw();
        }else if("奥迪".equals(carName)){
            return new Audi();
        }
        return null;
    }
}
